Skip to content

Add a Zcash migration view to the More menu - #1569

Draft
sneurlax wants to merge 2 commits into
feat/zcash-poolsfrom
feat/zcash-migration
Draft

sneurlax wants to merge 2 commits into
feat/zcash-poolsfrom
feat/zcash-migration

Conversation

@sneurlax

@sneurlax sneurlax commented Dec 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a "Migrate" entry to a Zcash wallet's More menu, on mobile and on desktop.
  • It opens a view that shows what the wallet holds in the Sapling pool and in transparent coins, each with a "Move to Ironwood" button.
  • The button prepares the move from Move Zcash Sapling and transparent funds to Ironwood #1568 and opens the usual confirmation view. Confirming broadcasts it, and leaving the confirmation drops it, as for a send.
  • A move the wallet refuses is explained in a dialog with the wallet's own message (funds too old to move in this version, nothing free to move, the Sapling parameters could not be downloaded).

Stacked on #1568.

Commits

  1. feat: add a Zcash migration view to the More menu.

Size

5 files, +574: the view (273 lines), its test (252), and 49 lines that add the entry to the two menus and the route.

How it works

  • lib/pages/zcash_migration/zcash_migration_view.dart holds the view and ZcashMigrationPanel, the list of pools, which takes its amounts and callbacks as arguments.
  • The view reads ZcashWallet.movableFunds() when it opens and again after a move is confirmed.
  • The confirmation is ConfirmTransactionView, unchanged: a pushed route on mobile and a dialog on desktop, as the send views open it. The move is given an empty note, which the mobile confirmation requires.
  • No shared view changes. The entry is one item in wallet_view.dart's More list and one in desktop_wallet_features.dart, both conditional on the wallet being a Zcash wallet.

Known limits

  • The amounts are not updated while the view is open and the wallet syncs. They are read again after a move, and when the view is opened again.
  • A pool whose move could not pay its fee shows as empty, and its button is disabled.
  • While a move is prepared the view shows the usual loading dialog without progress. For a move from Sapling that can include the download of the Sapling parameters (about 52 MB) and a scan of the blocks since the oldest note.
  • The limits of the moves themselves are in Move Zcash Sapling and transparent funds to Ironwood #1568: old Sapling funds, 50 notes or coins per transaction, dust and one zatoshi of Sapling change left behind, no Orchard migration.
  • The entry uses the recycle icon that the Masternodes entry uses. There is no art for it.

Verification

At this PR's head (1d75b536e):

  • test/pages/zcash_migration/zcash_migration_view_test.dart: 5 pass. The panel shows each pool's amount and reports a tap only for a pool that holds funds. On the mobile and on the desktop layout, with a faked wallet: the view shows the wallet's funds, shows the wallet's message when a move is refused, opens the confirmation view with the prepared move, and leaving the confirmation cancels the move in the wallet.
  • flutter analyze on the changed Dart files: no errors or warnings. CI's format check on them: clean.
  • The Zcash tests: the 150 of Move Zcash Sapling and transparent funds to Ironwood #1568 and the 5 of this PR pass.
  • The full flutter test suite: 1587 passed, 8 skipped.
  • The end-to-end suite of the stack: 1/1.
  • In the built Linux app, with a throwaway integration test that is not part of this PR, run before the last changes to Move Zcash Sapling and transparent funds to Ironwood #1568 with the same view code: a new Zcash wallet shows "Migrate" in its feature row, the view opens with both pools at zero and their buttons disabled, and the back button returns to the wallet.

Not run: a move with funds through the view in the built app, and the view in a mobile build. The moves are run against a regtest chain by the end-to-end suite in #1568, which calls the wallet directly.

@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.80315% with 32 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/zcash-pools@140c9ea). Learn more about missing BASE report.

Files with missing lines Patch % Lines
lib/pages/wallet_view/wallet_view.dart 0.00% 11 Missing ⚠️
...ib/pages/zcash_migration/zcash_migration_view.dart 91.26% 9 Missing ⚠️
...llet_view/sub_widgets/desktop_wallet_features.dart 0.00% 7 Missing ⚠️
lib/route_generator.dart 16.66% 5 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##             feat/zcash-pools    #1569   +/-   ##
===================================================
  Coverage                    ?   22.38%           
===================================================
  Files                       ?     1159           
  Lines                       ?   117036           
  Branches                    ?        0           
===================================================
  Hits                        ?    26196           
  Misses                      ?    90840           
  Partials                    ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant